LinearGauge for ASP.NET Web Forms
Adding Labels
Task-Based Help > Adding Labels

In this step you will add Labels to the C1LinearGauge control. The following steps assume you have already added a C1LinearGauge control to the page.

Note: Labels are added to the C1LinearGauge control by default. In case the Labels are not visible, set the Visible property to True.

In Design View

Complete the following steps to add labels to the C1LinearGauge control in the Design View:

  1. Right click on the control and select Properties.
  2. In the Property Window, expand the Behavior Property.
  3. Expand the Labels Property.
  4. Set Visible to “True”. 

In Source View

To add labels to the C1LinearGauge control, place your mouse between the <cc1:C1LinearGauge> </<cc1:C1LinearGauge> tags, and add the following markup:

To write code in Source View

<Labels Visible="true"></Labels>

Set Visible to true.

In Code

To add labels to the C1LinearGauge control, add the following code to the Page_Load event:

To write the code in Visual Basic:

Visual Basic
Copy Code
' Adding labels to C1LinearGuage
 C1LinearGauge1.Labels.Visible = True

To write the code in C#:

C#
Copy Code
// Adding labels to C1LinearGuage
 C1LinearGauge1.Labels.Visible = true;

What You've Accomplished

When you run your application, observe that your gauge contains Labels and the gauge appears as shown in the following image:

See Also